package com.hvisions.service;

import com.hvisions.entity.User;
import com.hvisions.vo.UserOnlineVo;
import com.hvisions.vo.base.ResponseVo;

import java.io.Serializable;
import java.util.List;

/**
 * @Author: Lau
 * @Description:
 * @Date: Created in 10:11 2019/10/24
 * @Modified By:
 */
public interface IUserService {
    /**
     * 更新最后登录时间
     * @param user
     */
    void updateLastLoginTime(User user);

    /**
     * 根据用户名称查询用户
     * @param username
     * @return
     */
    User selectByUsername(String username);

    /**
     * 查询用户列表
     * @param user
     * @return
     */
    List<User> selectUsers(User user);


    int register(User userform);

    int updateStatusBatch(List<String> userIdsList, Integer statusInvalid);

    int updateByUserId(User userForm);

    User selectByUserId(String userId);

    ResponseVo addAssignRole(String userId, List<String> roleIdsList);

    /**
     * 查询在线用户
     * @param userOnlineVo
     * @return list
     */
    List<UserOnlineVo> selectOnlineUsers(UserOnlineVo userOnlineVo);

    /**
     * 踢出用户
     * @param sessionId 会话id
     * @param username 用户名
     */
    void kickout(Serializable sessionId, String username);
}
